// Created by WXX on 2021/9/21 10:02
#include <iostream>
#include <vector>

using namespace std;

/**
 * 执行用时：0 ms, 在所有 C++ 提交中击败了100.00%的用户
 * 内存消耗：6 MB, 在所有 C++ 提交中击败了50.09%的用户
 */
class Solution {
public:
    vector<int> constructRectangle(int area) {
        int L = area, W = 1;
        for (int i = 1; i <= area / i; i++)
            if (area % i == 0) {
                L = area / i;
                W = i;
            }
        return {L, W};
    }
};

void OutputBasicArray1D(vector<int> nums) {
    cout << "[";
    for (int i = 0; i < nums.size(); i++) {
        cout << nums[i];
        if (i != nums.size() - 1) cout << ", ";
    }
    cout << "]" << endl;
}

int main() {

    OutputBasicArray1D(Solution().constructRectangle(4));
    OutputBasicArray1D(Solution().constructRectangle(5));

    return 0;
}
